// InnerTree.h : header file
//
#ifndef INNERTREE_H
#define INNERTREE_H

#pragma once
/////////////////////////////////////////////////////////////////////////////
// CInnerTree window

class CInnerTree : public CTreeCtrl
{
// Construction
public:
	CInnerTree();
	virtual ~CInnerTree();
	bool isInited;
protected:
    int m_space;
    int m_ItemHeight;
// Attributes
public:

// Operations
public:
    INT SortItem(HTREEITEM hItem);
protected:
    void DrawTitle(CDC *pDC,HTREEITEM hTreeItem,CRect rect);
    void DrawBack(CDC *pDC,int nItemState,CRect rect);
    void DrawFocusRect(CDC* pDC,LPCRECT lpRect);
    void DrawBmp(CDC *pDC,HTREEITEM hTreeItem,CRect rect,int flash);
    void DrawText(CDC *pDC,HTREEITEM hTreeItem,CRect rect);

    void On_Dblclk(HTREEITEM hItem);

protected:
    COLORREF crBkColor;
    COLORREF crTextColor;
	//{{AFX_MSG(CInnerTree)
	//afx_msg void OnDblclk(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
    afx_msg void OnCustomDraw(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

#endif //INNERTREE_H
